package com.itheima.chapter09.io.bytestream;

import java.io.FileOutputStream;
import java.io.IOException;

//字节写数据的2个小问题
public class OutputDemo3 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos =new FileOutputStream("MyIdeaTest\\aaa\\a.txt");
        fos.write(97);
        fos.write("\r\n".getBytes());
        fos.write(98);
        fos.write("\r\n".getBytes());
        fos.write(99);
        fos.write("\r\n".getBytes());
        fos.write(100);
        fos.write("\r\n".getBytes());
        FileOutputStream fos1 =new FileOutputStream("MyIdeaTest\\aaa\\a.txt",true);
        fos1.write(102);
        fos1.write("\r\n".getBytes());
        fos1.write(103);
        fos1.write("\r\n".getBytes());
        fos.close();
        fos1.close();


    }
}
